import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    token: null
  },
  getters: {
  },
  mutations: {
    setToken(state, token) {
      state.token = token
    }
  },
  actions: {
    login({ dispatch, commit }, data) {
      commit("setToken", data.token)
      console.log('logi111', data)
    },
  },
  modules: {
  }
})
